<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>数据装载配置表新增</title>
<link href="../../static/plugin/easyui/themes/bootstrap/easyui.css"
	rel="stylesheet" type="text/css" />
<link href="../../static/plugin/easyui/themes/icon.css" rel="stylesheet"
	type="text/css" />
<link href="../../static/css/esaas-easyui-add.css" rel="stylesheet"
	type="text/css" />
<script src="../../static/plugin/easyui/jquery.min.js"
	type="text/javascript"></script>
<script src="../../static/plugin/easyui/jquery.easyui.min.js"
	type="text/javascript" charset="utf-8"></script>
<script src="../../static/plugin/easyui/locale/easyui-lang-zh_CN.js"
	type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.util.js"
	type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.jquery.ajax.js"
	type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.easyui.util.js"
	type="text/javascript"></script>
<script src="../../ffres/dict/all.js" type="text/javascript"></script>
<a href="" target="_blank" id="commonLink" name="commonLink"></a>
</head>
<body class="easyui-layout">
	<form id="ff" method="post">
		<div class="esaas-info-title">数据装载配置表信息</div>
		<table class="esaas-info-add-table">
			<tr>
				<td width="15%" align="right">配置标识符：</td>
				<td width="35%"><input class="easyui-textbox" type="text"
					id="pluginConfId" name="pluginConfId"
					data-options="required:true,disabled:true"
					style="width: 100%; height: 25px;"></input></td>
				<td width="15%" align="right">配置顺序：</td>
				<td width="35%"><input class="easyui-textbox" type="text"
					name="confSort" data-options="required:true"
					style="width: 100%; height: 25px;"></input></td>

			</tr>
			<tr>
				<td width="15%" align="right">数据库表名：</td>
				<td width="35%"><input class="easyui-textbox" type="text"
					name="tableName" data-options="required:true"
					style="width: 100%; height: 25px;"></input></td>
				<td width="15%" align="right">表中文名称：</td>
				<td width="35%"><input class="easyui-textbox" type="text"
					name="tableCnname" data-options="required:true"
					style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">数据表类型：</td>
				<td width="35%"><select class="easyui-combobox" id="tableType"
					name="tableType" style="width: 100%; height: 25px;"
					data-options="required:true,editable:false,valueField:'enname',textField:'cnname',data:BAT_TAB_TYPE">
				</select></td>
				<td width="15%" align="right">供数系统名称：</td>
				<td width="35%"><input class="easyui-textbox" type="text"
					name="upSysname" data-options="required:true"
					style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">数据装载方式：</td>
				<td width="35%"><select class="easyui-combobox"
					id="tableLoadMode" name="tableLoadMode"
					style="width: 100%; height: 25px;"
					data-options="required:true,editable:false,valueField:'enname',textField:'cnname',data:BAT_TABLE_LOAD_MODE">
				</select></td>
			</tr>
			<tr>
				<td width="15%" align="right">文件路径：</td>
				<td colspan="3"><input class="easyui-textbox" type="text"
					name="loadFromFile" data-options="required:true"
					style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">文件编码格式：</td>
				<td width="35%"><input class="easyui-textbox" type="text"
					name="fileCharset" data-options="required:true"
					style="width: 100%; height: 25px;"></input></td>
				<td width="15%" align="right">缓冲区大小(K)：</td>
				<td width="35%"><input class="easyui-textbox" type="text"
					name="loadBufferSize" data-options="required:true"
					style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">字段分隔符：</td>
				<td width="35%"><input class="easyui-textbox" type="text"
					name="loadSeparator" data-options="required:true"
					style="width: 100%; height: 25px;"></input></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td width="15%" align="right">指定字段：</td>
				<td colspan="3"><input class="easyui-textbox" type="text"
					name="loadFields" data-options="required:false,multiline: true"
					style="width: 100%; height: 45px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">建表语句：</td>
				<td colspan="3"><input class="easyui-textbox" type="text"
					name="createTableDdl" data-options="required:false,multiline: true"
					style="width: 100%; height: 45px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">装载前执行语句：</td>
				<td colspan="3"><input class="easyui-textbox" type="text"
					name="beforeLoadSql" data-options="required:false,multiline: true"
					style="width: 100%; height: 45px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">装载后执行语句：</td>
				<td colspan="3"><input class="easyui-textbox" type="text"
					name="afterLoadSql" data-options="required:false,multiline:true"
					style="width: 100%; height: 45px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">是否允许条数为零：</td>
				<td width="35%"><select class="easyui-combobox"
					id="fileRowFlag" name="fileRowFlag"
					style="width: 100%; height: 25px;"
					data-options="required:true,editable:false,valueField:'enname',textField:'cnname',data:BAT_YES_OR_NO">
				</select></td>
				<td width="15%" align="right">是否忽略警告：</td>
				<td width="35%"><select class="easyui-combobox"
					id="loadWarnFlag" name="loadWarnFlag"
					style="width: 100%; height: 25px;"
					data-options="required:true,editable:false,valueField:'enname',textField:'cnname',data:BAT_YES_OR_NO">
				</select></td>
			</tr>
			<tr>
				<td width="15%" align="right">差异比较方式：</td>
				<td width="35%"><select class="easyui-combobox"
					id="diffCompMethod" name="diffCompMethod"
					style="width: 100%; height: 25px;"
					data-options="required:true,editable:false,valueField:'enname',textField:'cnname',data:BAT_DIFF_COMP_METHOD">
				</select></td>
				<td width="15%" align="right">比较阀值(%)：</td>
				<td width="35%"><input class="easyui-textbox" type="text"
					name="limitPercent" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">差异处理方式：</td>
				<td width="35%"><select class="easyui-combobox"
					id="diffDealMethod" name="diffDealMethod"
					style="width: 100%; height: 25px;"
					data-options="required:true,editable:false,valueField:'enname',textField:'cnname',data:BAT_DIFF_DEAL_METHOD">
				</select></td>
				<td width="15%" align="right">装载失败处理方式：</td>
				<td width="35%"><select class="easyui-combobox"
					id="loadFaildDeal" name="loadFaildDeal"
					style="width: 100%; height: 25px;"
					data-options="required:true,editable:false,valueField:'enname',textField:'cnname',data:BAT_FAILD_DEAL_TYPE">
				</select></td>
			</tr>
			<tr>
				<td width="15%" align="right">是否处理空字符串：</td>
				<td width="35%"><select class="easyui-combobox"
					id="isDealEmptyStr" name="isDealEmptyStr"
					style="width: 100%; height: 25px;"
					data-options="required:false,editable:false,valueField:'enname',textField:'cnname',data:STD_PUB_YN">
				</select></td>
				<td width="15%" align="right">空串替换值：</td>
				<td width="35%"><input class="easyui-textbox" type="text"
					name="dealEmptyStr" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">是否去首行：</td>
				<td width="35%"><select class="easyui-combobox"
					id="isFirstLine" name="isFirstLine"
					style="width: 100%; height: 25px;"
					data-options="required:false,editable:false,valueField:'enname',textField:'cnname',data:STD_PUB_YN">
				</select></td>
			</tr>
		</table>
	</form>
	<div style="text-align: center; padding: 15px">
		<a href="javascript:void(0)" class="easyui-linkbutton"
			onclick="submitForm()">&nbsp;保&nbsp;存&nbsp;</a> <a
			href="javascript:void(0)" class="easyui-linkbutton"
			onclick="closeForm()">&nbsp;关&nbsp;闭&nbsp;</a>
	</div>
	<script>
		$(function() {
			$('#pluginConfId').textbox('setValue',
					$.getUrlParam('pluginConfId'));
		});

		function submitForm() {
			if (!$('#ff').form('validate'))
				return;
			var jsonData = $("#ff").serializeJson();
			$.restfulPostJson('../../api/plugin/load/conf', jsonData, function(
					data) {
				window.parent.reloadList();
			});
		};

		function closeForm() {
			window.parent.JLEUtil.closewin();
		}
	</script>
</body>
</html>
